﻿Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.Security
Partial Class loggedin
    Inherits System.Web.UI.Page

    Protected Sub Page_PreLoad(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreLoad
        If (Session("User") = "") Then
            Response.Redirect("main.aspx")
        End If

        Dim dd As New UserManagement

        If Not IsPostBack Then
            dd.PopDDL(DropDownListQuestion)
        End If

    End Sub

    Protected Sub btnLogout_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogout.Click
        Session.Remove("User") 'HttpContext.Current.
        Response.Redirect("main.aspx")
    End Sub

    Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
        Dim Selection As String
        Selection = DropDownListQuestion.SelectedValue

        If Selection = "Multiple Choice" Then
            Response.Redirect("Multiple_Choice.aspx")
        ElseIf Selection = "Short Answer" Then
            Response.Redirect("Short_Answer.aspx")
        ElseIf Selection = "Numeric" Then
            Response.Redirect("Numeric.aspx")
        End If


    End Sub
End Class
